home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / OCETemplates.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  89.6 KB  |  1,680 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OCETemplates.a
  3. ;
  4. ;    Contains:    Apple Open Collaboration Environment Templates Interfaces.
  5. ;
  6. ;    Version:    Technology:    AOCE Toolbox 1.02
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__OCETEMPLATES__') = 'UNDEFINED' THEN
  18. __OCETEMPLATES__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  24.     include 'Events.a'
  25.     ENDIF
  26.  
  27.     IF &TYPE('__OCE__') = 'UNDEFINED' THEN
  28.     include 'OCE.a'
  29.     ENDIF
  30.  
  31.     IF &TYPE('__OCESTANDARDMAIL__') = 'UNDEFINED' THEN
  32.     include 'OCEStandardMail.a'
  33.     ENDIF
  34.  
  35.  
  36. ; ************************************************************************************************
  37. ; ********************************* Template Resource Constants: *********************************
  38. ; ***********************************************************************************************
  39.  
  40.  
  41. ;  Current versions of all the different template types: 
  42.  
  43. kDETAspectVersion                EQU        -976
  44. kDETInfoPageVersion                EQU        -976
  45. kDETKillerVersion                EQU        -976
  46. kDETForwarderVersion            EQU        -976
  47. kDETFileTypeVersion                EQU        -976
  48. ;     "Normal" separation for template IDs within the file (this is just a suggestion; you can use whatever
  49. ;    separation you like, so long as two separate templates don't have overlapping resources): 
  50.  
  51. kDETIDSep                        EQU        250
  52. ;  A few predefined base IDs (again, just suggestions): 
  53.  
  54. kDETFirstID                        EQU        1000
  55. kDETSecondID                    EQU        1250
  56. kDETThirdID                        EQU        1500
  57. kDETFourthID                    EQU        1750
  58. kDETFifthID                        EQU        2000
  59. ;     Templates consist of a set of associated resources, at constant offsets from a "base ID" set by the
  60. ;    signature resource of the template. In the case of aspect templates, most of the resources in the
  61. ;    template are accessible from the template as property default values. The property number is the same
  62. ;    as the offset from the base ID of the resource. In describing the resources which make up templates,
  63. ;    we give the type, the offset, and a description. For aspect templates, the offset is also the property #. 
  64. ;    
  65. ;    All templates include the following resource fork resources:
  66. ;
  67. ;     Type    Offset                        Description
  68. ;     ----    ------                        -----------
  69. ;    'rstr'    kDETTemplateName            Contains the name of the template
  70. ;
  71. ;
  72.  
  73.  
  74. kDETTemplateName                EQU        0
  75. ;     Aspects, info-pages, and forwarders include the following as well:
  76. ;
  77. ;     Type    Offset                        Description
  78. ;     ----    ------                        -----------
  79. ;    'rstr'    kDETRecordType                Contains the type of record this applies to
  80. ;    'rstr'    kDETAttributeType            Contains the type of attribute this applies to
  81. ;    'detn'    kDETAttributeValueTag        Contains the tag of the attribute values this applies to
  82. ;
  83. ;
  84.  
  85.  
  86. kDETRecordType                    EQU        1
  87. kDETAttributeType                EQU        2
  88. kDETAttributeValueTag            EQU        3
  89.  
  90. ;  ************************************ Aspects 
  91. ;     In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
  92. ;    defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
  93. ;    both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
  94. ;    resource). Resource types are given in all cases below; even if there is no actual resource (for example in
  95. ;    the case of kDETAspectName), it indicates the type for the dynamically generated property. A resource type of
  96. ;    'rstr' corresponds to a property type of kDETPrTypeString; type 'detn' corresponds to kDETPrTypeNumber; and
  97. ;    'detb' corresponds to kDETPrTypeBinary.
  98. ;
  99. ;     Type    Offset                        Description
  100. ;     ----    ------                        -----------
  101. ;    'deta'    0                            Identifies the type of resource
  102. ;    'detc'    kDETCode                    Is the code resource, if any is used
  103. ;    'ICN#'    kDETAspectMainBitmap
  104. ;    'icl8'    kDETAspectMainBitmap
  105. ;    'icl4'    kDETAspectMainBitmap
  106. ;    'ics#'    kDETAspectMainBitmap
  107. ;    'ics8'    kDETAspectMainBitmap
  108. ;    'ics4'    kDETAspectMainBitmap
  109. ;    'sicn'    kDETAspectMainBitmap        Is the icon suite to display for this item type (main aspect only)
  110. ;    'rstr'    kDETAspectName                Contains the name of the item (attribute main aspect only)
  111. ;    'rst#'    kDETAspectCategory            Contains the internal categories for the record type (main aspect only)
  112. ;    'rst#'    kDETAspectExternalCategory    Contains the external (user-visible) names which correspond to the categories in
  113. ;                                        kDETAspectCategory; if this resource is not present, external names are taken from
  114. ;                                        another template; if no other template provides an external name for a given internal
  115. ;                                        category, the internal name is used as the external name (main aspect only)
  116. ;    'rstr'    kDETAspectKind                Is the item kind to display (main aspect only)
  117. ;    'detn'    kDETAspectGender            Is the gender of this kind of object for internationalization (main aspect only)
  118. ;    'rstr'    kDETAspectWhatIs            Is the string for balloon help when item is in sublist (main aspect only)
  119. ;    'rstr'    kDETAspectAliasKind            Is the item kind to display for aliases to this type of item (main aspect only)
  120. ;    'detn'    kDETAspectAliasGender        Is the gender of an alias to this kind of object for internationalization (main aspect only)
  121. ;    'rstr'    kDETAspectAliasWhatIs        Is the string for balloon help when an alias to the item is in sublist (main aspect only)
  122. ;    'rst#'    kDETAspectBalloons            Is a list of strings for balloon help; for each item in an info-page, it's
  123. ;                                        property # times 2 is used as an index into this array; if the item is not editable,
  124. ;                                        then the property # times 2 plus 1 is used
  125. ;    'rstr'    kDETAspectNewMenuName        Is the string to be used for the user to select new item creation; for records, the
  126. ;                                        string is used as a menu entry in the Catalogs menu; for attributes, the string
  127. ;                                        is used in a selection dialog invoked by an "Add..." button
  128. ;    'rstr'    kDETAspectNewEntryName        Is the name to be used for new records (with a digit appended if not unique)
  129. ;    'detb'    kDETAspectNewValue            Is the value to use when creating a new attribute value; the first four bytes
  130. ;                                        is the tag; the rest is the attribute value contents
  131. ;    'detn'    kDETAspectSublistOpenOnNew    If true (non-zero), automatically open newly created entries (property can be set
  132. ;                                        from a code resource, or via a default value in a resource)
  133. ;    'dett'    kDETAspectLookup            Is the attribute-to-property translation table
  134. ;    'rstr'    kDETAspectDragInString        Is a string describing the action of dragging into this aspect (if any)
  135. ;    'rstr'    kDETAspectDragInVerb        Is a single, short word that's the verb of the action (like "add" or "drop"; if
  136. ;                                        there's any doubt, use "OK")
  137. ;    'rstr'    kDETAspectDragInSummary        Is a short phrase that describes the action, suitable to be included in a selection list
  138. ;    'rst#'    kDETAspectRecordDragIn        Is a list of type pairs; in each pair, the first is the type of a record which
  139. ;                                        can be dragged into this aspect, and the second is the attribute type to store
  140. ;                                        the reference in
  141. ;    'rst#'    kDETAspectRecordCatDragIn    Is a list of category/attribute type pairs; in each pair, the first is the
  142. ;                                        category of records which can be dragged in, and the second is the type of
  143. ;                                        attribute to place the alias in
  144. ;    'rst#'    kDETAspectAttrDragIn        Is a list of type triples; in each triple, the first is the record type which can be
  145. ;                                        dragged from (or "" for any), the second is the attribute type which can be dragged
  146. ;                                        in, and the third is the attribute type to store the new attribute in
  147. ;    'rst#'    kDETAspectDragOut            Is a list of attribute types which can be dragged out of this aspect (an 'rst#'
  148. ;                                        resource with no entries means nothing can be dragged out; no 'rst#' resource means
  149. ;                                        everything can be dragged out)
  150. ;    'detm'    kDETAspectViewMenu            Is a table to fill in the view menu from
  151. ;    'detp'    kDETAspectReverseSort        Is a table listing which properties to sort in reverse order
  152. ;    'detw'    kDETAspectInfoPageCustomWindow    Is a specification of a custom window size/placement & whether to use the
  153. ;                                            page-selector (main aspect only)
  154. ;    'detv'    kDETAspectInfoPageCustomWindow    Is a view list which is common to all info-pages (main aspect only)
  155. ;
  156.  
  157.  
  158. kDETAspectCode                    EQU        4
  159. kDETAspectMainBitmap            EQU        5
  160. kDETAspectName                    EQU        6
  161. kDETAspectCategory                EQU        7
  162. kDETAspectExternalCategory        EQU        8
  163. kDETAspectKind                    EQU        9
  164. kDETAspectGender                EQU        10
  165. kDETAspectWhatIs                EQU        11
  166. kDETAspectAliasKind                EQU        12
  167. kDETAspectAliasGender            EQU        13
  168. kDETAspectAliasWhatIs            EQU        14
  169. kDETAspectBalloons                EQU        15
  170. kDETAspectNewMenuName            EQU        16
  171. kDETAspectNewEntryName            EQU        17
  172. kDETAspectNewValue                EQU        18
  173. kDETAspectSublistOpenOnNew        EQU        19
  174. kDETAspectLookup                EQU        20
  175. kDETAspectDragInString            EQU        21
  176. kDETAspectDragInVerb            EQU        22
  177. kDETAspectDragInSummary            EQU        23
  178. kDETAspectRecordDragIn            EQU        24
  179. kDETAspectRecordCatDragIn        EQU        25
  180. kDETAspectAttrDragIn            EQU        26
  181. kDETAspectAttrDragOut            EQU        27
  182. kDETAspectViewMenu                EQU        28
  183. kDETAspectReverseSort            EQU        29
  184. kDETAspectInfoPageCustomWindow    EQU        30
  185. ;  Properties: 
  186.  
  187. kDETNoProperty                    EQU        -1
  188. ;  Each aspect has 250 attribute properties in this range: 
  189.  
  190. kDETFirstLocalProperty            EQU        0
  191. kDETLastLocalProperty            EQU        249
  192. ;  Developers should use property numbers starting at this point: 
  193.  
  194. kDETFirstDevProperty            EQU        40
  195. ;  The following range provides constant numeric properties for use in patterns and comparisons (constant n is
  196. ;  
  197. ;   given by kDETFirstConstantProperty+n): 
  198.  
  199.  
  200. kDETFirstConstantProperty        EQU        250
  201. kDETLastConstantProperty        EQU        499
  202. ;  To convert a number into a constant property, add this: 
  203.  
  204. kDETConstantProperty            EQU        250
  205. kDETZeroProperty                EQU        250
  206. kDETOneProperty                    EQU        251
  207. kDETFalseProperty                EQU        250
  208. kDETTrueProperty                EQU        251
  209. ;  The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists: 
  210.  
  211. kDETPrName                        EQU        3050
  212. kDETPrKind                        EQU        3051
  213. ;  Access mask properties: 
  214.  
  215. kDETDNodeAccessMask                EQU        25825                ; The DNode access mask 
  216. kDETRecordAccessMask            EQU        25826                ; The record access mask 
  217. kDETAttributeAccessMask            EQU        25827                ; The attribute access mask 
  218. kDETPrimaryMaskByBit            EQU        25828                ; A set of sixteen properties to access all bits of the primary mask 
  219. ;  See AOCE documentation for details definitions of each of these bits: 
  220.  
  221. kDETPrimarySeeMask                EQU        25828
  222. kDETPrimaryAddMask                EQU        25829
  223. kDETPrimaryDeleteMask            EQU        25830
  224. kDETPrimaryChangeMask            EQU        25831
  225. kDETPrimaryRenameMask            EQU        25832
  226. kDETPrimaryChangePrivsMask        EQU        25833
  227. kDETPrimaryTopMaskBit            EQU        25843
  228. ;  The following property is zero until we've completed the first catalog lookup; from then on it's 1 
  229.  
  230. kDETPastFirstLookup                EQU        26550
  231. ;  The following property is the page number; issuing a property command with this property will flip info-pages 
  232.  
  233. kDETInfoPageNumber                EQU        27050
  234. ;  The value of the following properties contains the template number of the targeted aspect's template, and the
  235. ;   currently open info-page (if any). These values can be used with kDETAspectTemplate and kDETInfoPageTemplate
  236. ;   target selectors. 
  237.  
  238.  
  239. kDETAspectTemplateNumber        EQU        26551
  240. kDETInfoPageTemplateNumber        EQU        26552
  241. ;  Properties for property commands to deal with sublist items: 
  242.  
  243. kDETOpenSelectedItems            EQU        26553                ; Open selected sublist items 
  244. kDETAddNewItem                    EQU        26554                ; Add new sublist item 
  245. kDETRemoveSelectedItems            EQU        26555                ; Remove selected sublist items 
  246. ;  Property types are used to specify types of properties and conversions between types (zero and negative numbers
  247. ;   are reserved for Apple; developer code resources can use positive numbers): 
  248.  
  249. kDETPrTypeNumber                EQU        -1                    ; A number 
  250. kDETPrTypeString                EQU        -2                    ; A string 
  251. kDETPrTypeBinary                EQU        -3                    ; A binary block 
  252. ;  ************************************ Info-pages 
  253. ;  Info-pages include the following as well:
  254. ;
  255. ;     Type    Offset                        Description
  256. ;     ----    ------                        -----------
  257. ;    'deti'    0                            Identifies the type of resource; see below for details on the contents
  258. ;    'rstr'    kDETInfoPageName            Is the name of the view to use in the page selection pop-up
  259. ;    'rstr'    kDETInfoPageMainViewAspect    Is the name of the aspect to use with the main page view
  260. ;    'rstr'    kDETInfoPageMenuName        Is the name of the catalogs menu ("Catalogs" if not present)
  261. ;    'detm'    kDETInfoPageMenuEntries        Are menu entries to go in the Catalogs menu
  262. ;
  263. ;
  264.  
  265.  
  266. kDETInfoPageName                EQU        4
  267. kDETInfoPageMainViewAspect        EQU        5
  268. kDETInfoPageMenuName            EQU        6
  269. kDETInfoPageMenuEntries            EQU        7
  270.  
  271. ;  ************************************ Views 
  272. ;
  273. ;   Flags: 
  274.  
  275.  
  276. kDETNoFlags                        EQU        0                    ; Main view (non-sublist) field enabled 
  277. kDETEnabled                        EQU        $01
  278. ;  The following flags make sense for items in a sublist only 
  279.  
  280.                                                             ; Hilight view when entry is selected 
  281. kDETHilightIfSelected            EQU        $01
  282. ;  The following flags make sense for text views only 
  283.  
  284. kDETNumericOnly                    EQU        $08                    ; Only allow the user to enter digits 
  285. kDETMultiLine                    EQU        $10                    ; Allow multiple lines in view 
  286. kDETDynamicSize                    EQU        $0200                ; Don't draw box around text until user clicks in it, then auto-size it 
  287.                                                             ; Don't allow the user to enter colons (convert ":"s to "-"s) 
  288. kDETAllowNoColons                EQU        $0400
  289. ;  The following flags are used for pop-up menus only 
  290.  
  291.                                                             ; Automatically resize pop-up based on contents 
  292. kDETPopupDynamicSize            EQU        $0100
  293. ;  The following flags are used for EditPicture views only 
  294.  
  295.                                                             ; Scale picture to view bounds rather than cropping 
  296. kDETScaleToView                    EQU        $0100
  297. ;     Sizes for icons 
  298.  
  299. kDETLargeIcon                    EQU        0
  300. kDETSmallIcon                    EQU        1
  301. kDETMiniIcon                    EQU        2
  302. ;  Stolen from TextEdit.h 
  303.  
  304. kDETLeft                        EQU        0
  305. kDETCenter                        EQU        1
  306. kDETRight                        EQU        -1
  307. kDETForceLeft                    EQU        -2
  308. ;  Flags for use within Box view type attributes - these are distinct from the flags above 
  309.  
  310. kDETUnused                        EQU        0
  311. kDETBoxTakesContentClicks        EQU        $01
  312. kDETBoxIsRounded                EQU        $02
  313. kDETBoxIsGrayed                    EQU        $04
  314. kDETBoxIsInvisible                EQU        $08
  315. ;  The common font info 
  316.  
  317. kDETApplicationFont                EQU        1
  318. kDETApplicationFontSize            EQU        9
  319. kDETAppFontLineHeight            EQU        12
  320. kDETSystemFont                    EQU        0
  321. kDETSystemFontSize                EQU        12
  322. kDETSystemFontLineHeight        EQU        16
  323. kDETDefaultFont                    EQU        1
  324. kDETDefaultFontSize                EQU        9
  325. kDETDefaultFontLineHeight        EQU        12
  326. ;     These were taken from QuickDraw.h (where they're enums and therefore unusable in resource definitions): 
  327.  
  328. kDETNormal                        EQU        0
  329. kDETBold                        EQU        1
  330. kDETItalic                        EQU        2
  331. kDETUnderline                    EQU        4
  332. kDETOutline                        EQU        8
  333. kDETShadow                        EQU        $10
  334. kDETCondense                    EQU        $20
  335. kDETExtend                        EQU        $40
  336.  
  337. kDETIconStyle                    EQU        -3                    ; Normal text style for regular sublist entries, italic text style for aliases 
  338. ;  View menu: 
  339.  
  340. kDETChangeViewCommand            EQU        'view'                ; Change the view; used especially in StaticCommandTextFromView sublist headers 
  341. ;  Info-page window sizes: 
  342. ;  Default record info-pages: 
  343.  
  344. kDETRecordInfoWindHeight        EQU        228
  345. kDETRecordInfoWindWidth            EQU        400
  346. ;  Default attribute info-pages: 
  347.  
  348. kDETAttributeInfoWindHeight        EQU        250
  349. kDETAttributeInfoWindWidth        EQU        230
  350. ;  Page identifying icon (for default info-page layout): 
  351.  
  352. kDETSubpageIconTop                EQU        8
  353. kDETSubpageIconLeft                EQU        8
  354. kDETSubpageIconBottom            EQU        40
  355. kDETSubpageIconRight            EQU        40
  356. ;  ************************************ Killers 
  357. ;
  358. ;   Killers include the following as well:
  359. ;
  360. ;     Type    Offset                        Description
  361. ;     ----    ------                        -----------
  362. ;    'detk'    0                            Identifies the type of resource; see below for details on the contents
  363. ;    'rst#'    kDETKillerName                Contains a list of template names to be killed
  364. ;
  365. ;
  366.  
  367.  
  368. kDETKillerName                    EQU        1
  369. ;  ************************************ Forwarders 
  370. ;
  371. ;   Forwarders include the following as well:
  372. ;
  373. ;     Type    Offset                        Description
  374. ;     ----    ------                        -----------
  375. ;    'detf'    0                            Identifies the type of resource; see below for details on the contents
  376. ;    'rst#'    kDETForwarderTemplateNames    Contains a list of names of templates to forward to
  377. ;
  378. ;
  379.  
  380.  
  381. kDETForwarderTemplateNames        EQU        4
  382. ; **********************************************************************************
  383. ; ********************************* Code Resources: ********************************
  384. ; **********************************************************************************
  385. ;  Target specification: 
  386.  
  387. kDETSelf                        EQU        0                    ; The "current" item 
  388. kDETSelfOtherAspect                EQU        1                    ; Another aspect of the current item 
  389. kDETParent                        EQU        2                    ; The parent (i.e., the aspect we're in the sublist of, if any) of the current item 
  390. kDETSublistItem                    EQU        3                    ; The itemNumberth item in the sublist 
  391. kDETSelectedSublistItem            EQU        4                    ; The itemNumberth selected item in the sublist 
  392. kDETDSSpec                        EQU        5                    ; The item specified by the packed DSSpec 
  393. kDETAspectTemplate                EQU        6                    ; A specific aspect template (number itemNumber) 
  394. kDETInfoPageTemplate            EQU        7                    ; A specific info-page template (number itemNumber) * Force type to be short 
  395. kDETHighSelector                EQU        $F000
  396. ; typedef long                             DETTargetSelector
  397.  
  398. DETTargetSpecification    RECORD 0
  399. selector                 ds.l    1                ; offset: $0 (0)        ;  Target selection method (see above) 
  400. aspectName                 ds.l    1                ; offset: $4 (4)        ;  The name of the aspect (kDETSelfOtherAspect, kDETSublistItem,
  401. ;    kDETSelectedSublistItem, kDETDSSpec); nil for main aspect or none; 
  402. ;   always filled in for calls if there is an aspect, even if it's the main aspect 
  403. itemNumber                 ds.l    1                ; offset: $8 (8)        ;  Sublist index (kDETSublistItem & kDETSelectedSublistItem & kDETAspectTemplate);
  404. ;    1-based indexing 
  405. dsSpec                     ds.l    1                ; offset: $C (12)        ;  DSSpec (kDETDSSpec only) 
  406. sizeof                     EQU *                    ; size:   $10 (16)
  407.                         ENDR
  408. ;  Code resource calls and call-backs both return an OSType:
  409. ;        kDETDidNotHandle (1)    = used by template to say "I didn't handle it" (for calls only)
  410. ;        noErr                    = function completed successfully
  411. ;        any error                = function failed, and here's why
  412. ;
  413.  
  414. ;  Call-back functions:
  415. ;
  416. ;        reqFunction                            Action
  417. ;        -----------                            ------
  418. ;        kDETcmdBeep                            Call SysBeep; useful for testing that a code resource's calls/call-backs are working at all
  419. ;
  420. ;        kDETcmdBusy                            Put up watch cursor and switch processes; user events elicit a beep
  421. ;
  422. ;        kDETcmdChangeCallFors                Change call-fors mask
  423. ;
  424. ;        kDETcmdGetCommandSelectionCount        Get the command selection count (for calls which have a command selection list)
  425. ;        kDETcmdGetCommandItemN                Get command selection item n (for calls which have a command selection list)
  426. ;
  427. ;        kDETcmdOpenDSSpec                    PackedDSSpec open (can also be done via AppleEvents -- this is a short-cut)
  428. ;
  429. ;        kDETcmdAboutToTalk                    About to talk to user: bring us to front, disable watch cursor, etc.
  430. ;
  431. ;        kDETcmdUnloadTemplates                Flush templates
  432. ;
  433. ;        kDETcmdTemplateCounts                Return number of aspect and info-page templates in system
  434. ;
  435. ;        kDETcmdGetDSSpec                    Get the PackedDSSpec for this object
  436. ;
  437. ;        kDETcmdSublistCount                    Return the count of the sublist items
  438. ;        kDETcmdSelectedSublistCount            Return the count of the selected sublist items
  439. ;
  440. ;        kDETcmdRequestSync                    Request a sync-up of the aspect with the catalog
  441. ;
  442. ;        kDETcmdBreakAttribute                Break an attribute -- apply all applicable patterns to an attribute to generate properties
  443. ;
  444. ;        kDETcmdGetTemplateFSSpec            Get the FSSpec of the file containing the template
  445. ;
  446. ;        kDETcmdGetOpenEdit                    Return the property of the view being edited (or kDETNoProperty if none)
  447. ;        kDETcmdCloseEdit                    Close the current edit
  448. ;
  449. ;        kDETcmdGetPropertyType                Get a property type
  450. ;
  451. ;        kDETcmdGetPropertyNumber            Get a property, number format
  452. ;        kDETcmdGetPropertyRString            Get a property, RString format
  453. ;        kDETcmdGetPropertyBinarySize        Get a property, binary, return size
  454. ;        kDETcmdGetPropertyBinary            Get a property, binary format
  455. ;
  456. ;        kDETcmdGetPropertyChanged            Get a property changed flag
  457. ;        kDETcmdGetPropertyEditable            Get a property editable flag
  458. ;
  459. ;        kDETcmdSetPropertyType                Set a property type
  460. ;
  461. ;        kDETcmdSetPropertyNumber            Set a property, number format
  462. ;        kDETcmdSetPropertyRString            Set a property, RString format
  463. ;        kDETcmdSetPropertyBinary            Set a property, binary data & size
  464. ;
  465. ;        kDETcmdSetPropertyChanged            Set a property changed flag
  466. ;        kDETcmdSetPropertyEditable            Set a property editable flag
  467. ;
  468. ;        kDETcmdDirtyProperty                Dirty a property (notify other code resources of change)
  469. ;
  470. ;        kDETcmdDoPropertyCommand            Issue a property command
  471. ;
  472. ;        kDETcmdAddMenu                        Add to the end of a dynamic menu
  473. ;        kDETcmdRemoveMenu                    Remove a dynamic menu item
  474. ;        kDETcmdMenuItemRString                Get a dynamic menu item RString
  475. ;
  476. ;        kDETcmdSaveProperty                    Force a save of a property -- apply all applicable patterns to write out the property
  477. ;
  478. ;        kDETcmdGetCustomViewUserReference    Get custom view user reference (as given in .r file)
  479. ;        kDETcmdGetCustomViewBounds            Get custom view current bounds
  480. ;
  481. ;        kDETcmdGetResource                    Get a resource from a template
  482. ;
  483.  
  484.  
  485.  
  486. kDETcmdSimpleCallback            EQU        0
  487. kDETcmdBeep                        EQU        1
  488. kDETcmdBusy                        EQU        2
  489. kDETcmdChangeCallFors            EQU        3
  490. kDETcmdGetCommandSelectionCount    EQU        4
  491. kDETcmdGetCommandItemN            EQU        5
  492. kDETcmdOpenDSSpec                EQU        6
  493. kDETcmdAboutToTalk                EQU        7
  494. kDETcmdUnloadTemplates            EQU        8
  495. kDETcmdTemplateCounts            EQU        9
  496. kDETcmdTargetedCallback            EQU        1000
  497. kDETcmdGetDSSpec                EQU        1001
  498. kDETcmdSublistCount                EQU        1002
  499. kDETcmdSelectedSublistCount        EQU        1003
  500. kDETcmdRequestSync                EQU        1004
  501. kDETcmdBreakAttribute            EQU        1005
  502. kDETcmdGetTemplateFSSpec        EQU        1006
  503. kDETcmdGetOpenEdit                EQU        1007
  504. kDETcmdCloseEdit                EQU        1008
  505. kDETcmdPropertyCallback            EQU        2000
  506. kDETcmdGetPropertyType            EQU        2001
  507. kDETcmdGetPropertyNumber        EQU        2002
  508. kDETcmdGetPropertyRString        EQU        2003
  509. kDETcmdGetPropertyBinarySize    EQU        2004
  510. kDETcmdGetPropertyBinary        EQU        2005
  511. kDETcmdGetPropertyChanged        EQU        2006
  512. kDETcmdGetPropertyEditable        EQU        2007
  513. kDETcmdSetPropertyType            EQU        2008
  514. kDETcmdSetPropertyNumber        EQU        2009
  515. kDETcmdSetPropertyRString        EQU        2010
  516. kDETcmdSetPropertyBinary        EQU        2011
  517. kDETcmdSetPropertyChanged        EQU        2012
  518. kDETcmdSetPropertyEditable        EQU        2013
  519. kDETcmdDirtyProperty            EQU        2014
  520. kDETcmdDoPropertyCommand        EQU        2015
  521. kDETcmdAddMenu                    EQU        2016
  522. kDETcmdRemoveMenu                EQU        2017
  523. kDETcmdMenuItemRString            EQU        2018
  524. kDETcmdSaveProperty                EQU        2019
  525. kDETcmdGetCustomViewUserReference EQU    2020
  526. kDETcmdGetCustomViewBounds        EQU        2021
  527. kDETcmdGetResource                EQU        2022                ; Force type to be long 
  528. kDETcmdHighCallback                EQU        $F0000000
  529. ; typedef unsigned long                 DETCallBackFunctions
  530.  
  531. ;  Call functions:
  532. ;
  533. ;        reqFunction                        Action
  534. ;        -----------                        ------
  535. ;        kDETcmdInit                        Called once when template is first loaded (good time to allocate private data); returns call-for list
  536. ;        kDETcmdExit                        Called once when template is freed (good time to free private data)
  537. ;
  538. ;        kDETcmdAttributeCreation        New sublist attribute creation about to occur; this gives the template a chance to modify
  539. ;                                        the value that's about to be created; sent to the template that will be used for
  540. ;                                        the main aspect of the new entry
  541. ;
  542. ;        kDETcmdDynamicForwarders        Return a list of dynamically created forwarders
  543. ;
  544. ;        kDETcmdInstanceInit                Called once when instance of template is started (good time to allocate private instance data)
  545. ;        kDETcmdInstanceExit                Called once when instance is ended (good time to free private instance data)
  546. ;
  547. ;        kDETcmdIdle                        Called periodically during idle times
  548. ;
  549. ;        kDETcmdViewListChanged            Called when the info-page view-list (list of enabled views) has changed
  550. ;
  551. ;        kDETcmdValidateSave                Validate save: about to save info-page, return noErr (or kDETDidNotHandle) if it's OK to do so
  552. ;
  553. ;        kDETcmdDropQuery                Drop query: return the appropriate operation for this drag; ask destination
  554. ;        kDETcmdDropMeQuery                Drop query: return the appropriate operation for this drag; ask dropee
  555. ;
  556. ;        kDETcmdAttributeNew                Attribute value new (return kDETDidNotHandle to let normal new processing occur)
  557. ;        kDETcmdAttributeChange            Attribute value change (return kDETDidNotHandle to let normal change processing occur)
  558. ;        kDETcmdAttributeDelete            Attribute value delete (return kDETDidNotHandle to let normal deletion occur); sent to the
  559. ;                                        main aspect of the attribute that's about to be deleted
  560. ;        kDETcmdItemNew                    Target item (record or attribute) has just been created
  561. ;
  562. ;        kDETcmdOpenSelf                    Self open (return noErr to prevent opening; return kDETDidNotHandle to allow it)
  563. ;
  564. ;        kDETcmdDynamicResource            Return a dynamically created resource
  565. ;
  566. ;        kDETcmdShouldSync                Check if the code resource wants to force a sync (update data from catalog)
  567. ;        kDETcmdDoSync                    Give code resource a chance to sync (read in and break all attributes)
  568. ;
  569. ;        kDETcmdPropertyCommand            Command received in the property number range (usually means a button's been pushed)
  570. ;
  571. ;        kDETcmdMaximumTextLength        Return maximum size for text form of property
  572. ;
  573. ;        kDETcmdPropertyDirtied            Property dirtied, need to redraw
  574. ;
  575. ;        kDETcmdPatternIn                Custom pattern element encountered on reading in an attribute
  576. ;        kDETcmdPatternOut                Custom pattern element encountered on writing out an attribute
  577. ;
  578. ;        kDETcmdConvertToNumber            Convert from template-defined property type to number
  579. ;        kDETcmdConvertToRString            Convert from template-defined property type to RString
  580. ;        kDETcmdConvertFromNumber        Convert from number to template-defined property type
  581. ;        kDETcmdConvertFromRString        Convert from RString to template-defined property type
  582. ;
  583. ;        kDETcmdCustomViewDraw            Custom view draw
  584. ;        kDETcmdCustomViewMouseDown        Custom view mouse down
  585. ;
  586. ;        kDETcmdKeyPress                    Key press (used primarily to filter entry into EditText views)
  587. ;        kDETcmdPaste                    Paste (used primarily to filter entry into EditText views)
  588. ;
  589. ;        kDETcmdCustomMenuSelected        Custom Catalogs menu selected
  590. ;        kDETcmdCustomMenuEnabled        Return whether custom Catalogs menu entry should be enabled
  591. ;
  592.  
  593.  
  594.  
  595. kDETcmdSimpleCall                EQU        0
  596. kDETcmdInit                        EQU        1
  597. kDETcmdExit                        EQU        2
  598. kDETcmdAttributeCreation        EQU        3
  599. kDETcmdDynamicForwarders        EQU        4
  600. kDETcmdTargetedCall                EQU        1000
  601. kDETcmdInstanceInit                EQU        1001
  602. kDETcmdInstanceExit                EQU        1002
  603. kDETcmdIdle                        EQU        1003
  604. kDETcmdViewListChanged            EQU        1004
  605. kDETcmdValidateSave                EQU        1005
  606. kDETcmdDropQuery                EQU        1006
  607. kDETcmdDropMeQuery                EQU        1007
  608. kDETcmdAttributeNew                EQU        1008
  609. kDETcmdAttributeChange            EQU        1009
  610. kDETcmdAttributeDelete            EQU        1010
  611. kDETcmdItemNew                    EQU        1011
  612. kDETcmdOpenSelf                    EQU        1012
  613. kDETcmdDynamicResource            EQU        1013
  614. kDETcmdShouldSync                EQU        1014
  615. kDETcmdDoSync                    EQU        1015
  616. kDETcmdPropertyCall                EQU        2000
  617. kDETcmdPropertyCommand            EQU        2001
  618. kDETcmdMaximumTextLength        EQU        2002
  619. kDETcmdPropertyDirtied            EQU        2003
  620. kDETcmdPatternIn                EQU        2004
  621. kDETcmdPatternOut                EQU        2005
  622. kDETcmdConvertToNumber            EQU        2006
  623. kDETcmdConvertToRString            EQU        2007
  624. kDETcmdConvertFromNumber        EQU        2008
  625. kDETcmdConvertFromRString        EQU        2009
  626. kDETcmdCustomViewDraw            EQU        2010
  627. kDETcmdCustomViewMouseDown        EQU        2011
  628. kDETcmdKeyPress                    EQU        2012
  629. kDETcmdPaste                    EQU        2013
  630. kDETcmdCustomMenuSelected        EQU        2014
  631. kDETcmdCustomMenuEnabled        EQU        2015
  632. kDETcmdHighCall                    EQU        $F0000000            ; Force the type to be long 
  633. ; typedef unsigned long                 DETCallFunctions
  634.  
  635. ;  Valid commandIDs for DETDropQueryBlock and DETDropMeQueryBlock (in addition to property numbers): 
  636.  
  637. kDETDoNothing                    EQU        'xxx0'
  638. kDETMove                        EQU        'move'
  639. kDETDrag                        EQU        'drag'
  640. kDETAlias                        EQU        'alis'
  641.  
  642. DETProtoCallBackBlock    RECORD 0
  643. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  644. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  645. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  646. sizeof                     EQU *                    ; size:   $16 (22)
  647.                         ENDR
  648. DETBeepBlock            RECORD 0
  649. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  650. sizeof                     EQU *                    ; size:   $4 (4)
  651.                         ENDR
  652. DETBusyBlock            RECORD 0
  653. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  654. sizeof                     EQU *                    ; size:   $4 (4)
  655.                         ENDR
  656. DETChangeCallForsBlock    RECORD 0
  657. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  658. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  659. newCallFors                 ds.l    1                ; offset: $14 (20)        ;   -> New call-for mask 
  660. sizeof                     EQU *                    ; size:   $18 (24)
  661.                         ENDR
  662. DETGetCommandSelectionCountBlock RECORD 0
  663. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  664. count                     ds.l    1                ; offset: $4 (4)        ;  <-  The number of items in the command selection list 
  665. sizeof                     EQU *                    ; size:   $8 (8)
  666.                         ENDR
  667.  
  668. kDETHFSType                        EQU        0                    ; HFS item type 
  669. kDETDSType                        EQU        1                    ; Catalog Service item type 
  670. kDETMailType                    EQU        2                    ; Mail (letter) item type 
  671. kDETMoverType                    EQU        3                    ; Sounds, fonts, etc., from inside a suitcase or system file 
  672. kDETLastItemType                EQU        $F0000000            ; Force it to be a long (C & C++ seem to disagree about the definition of 0xF000) 
  673. ; typedef unsigned long                 DETItemType
  674.  
  675. ;  FSSpec plus possibly interesting additional info 
  676. DETFSInfo                RECORD 0
  677. fileType                 ds.l    1                ; offset: $0 (0)        ;  File type 
  678. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  File creator 
  679. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Finder flags 
  680. fsSpec                     ds        FSSpec            ; offset: $A (10)        ;  FSSpec 
  681. sizeof                     EQU *                    ; size:   $50 (80)
  682.                         ENDR
  683. DSRec                    RECORD 0
  684. dsSpec                     ds.l    1                ; offset: $0 (0)        ;  <-  DSSpec for item (caller must DisposHandle() when done) 
  685. refNum                     ds.w    1                ; offset: $4 (4)        ;  <-  Refnum for returned address 
  686. identity                 ds.l    1                ; offset: $6 (6)        ;  <-  Identity for returned address 
  687. sizeof                     EQU *                    ; size:   $A (10)
  688.                         ENDR
  689. ItemRec                    RECORD 0
  690. fsInfo                     ds.l    1                ; offset: $0 (0)        ;  <-  FSSpec & info for item (caller must DisposHandle() when done) 
  691.                          ORG 0
  692. ds                         ds        DSRec            ; offset: $0 (0)
  693.                          ORG 0
  694. dsSpec                     ds.l    1                ; offset: $0 (0)        ;  <-  DSSpec for item (caller must DisposHandle() when done) 
  695.                          ORG 0
  696. ltrSpec                     ds.l    1                ; offset: $0 (0)        ;  <-  Letter spec for item (caller must DisposHandle() when done) 
  697.                          ORG 10
  698. sizeof                     EQU *                    ; size:   $A (10)
  699.                         ENDR
  700. DETGetCommandItemNBlock    RECORD 0
  701. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  702. itemNumber                 ds.l    1                ; offset: $4 (4)        ;   -> Item number to retrieve (1-based) 
  703. itemType                 ds.l    1                ; offset: $8 (8)        ;   -> Type of item to be returned (if we can interpret it as such) 
  704. item                     ds        ItemRec            ; offset: $C (12)
  705. sizeof                     EQU *                    ; size:   $16 (22)
  706.                         ENDR
  707. DETGetDSSpecBlock        RECORD 0
  708. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  709. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  710. dsSpec                     ds.l    1                ; offset: $14 (20)        ;  <-  Handle with result (caller must DisposHandle() when done) 
  711. refNum                     ds.w    1                ; offset: $18 (24)        ;  <-  Refnum for address if PD 
  712. identity                 ds.l    1                ; offset: $1A (26)        ;  <-  Identity for address 
  713. isAlias                     ds.b    1                ; offset: $1E (30)        ;  <-  True if this entry is an alias 
  714. isRecordRef                 ds.b    1                ; offset: $1F (31)        ;  <-  True if this entry is a record reference (reserved) 
  715. sizeof                     EQU *                    ; size:   $20 (32)
  716.                         ENDR
  717. DETGetTemplateFSSpecBlock RECORD 0
  718. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  719. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  720. fsSpec                     ds        FSSpec            ; offset: $14 (20)        ;  <-  FSSpec of template file 
  721. baseID                     ds.w    1                ; offset: $5A (90)        ;  <-  Base ID of this template 
  722. aspectTemplateNumber     ds.l    1                ; offset: $5C (92)        ;  <-  The template number for this aspect template 
  723. sizeof                     EQU *                    ; size:   $60 (96)
  724.                         ENDR
  725. DETGetOpenEditBlock        RECORD 0
  726. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  727. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  728. viewProperty             ds.w    1                ; offset: $14 (20)        ;  <-  The property of the view being edited (or kNoProperty if none) 
  729. sizeof                     EQU *                    ; size:   $16 (22)
  730.                         ENDR
  731. DETCloseEditBlock        RECORD 0
  732. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  733. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  734. sizeof                     EQU *                    ; size:   $14 (20)
  735.                         ENDR
  736. DETGetPropertyTypeBlock    RECORD 0
  737. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  738. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  739. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  740. propertyType             ds.w    1                ; offset: $16 (22)        ;  <-  The type of the property 
  741. sizeof                     EQU *                    ; size:   $18 (24)
  742.                         ENDR
  743. DETGetPropertyNumberBlock RECORD 0
  744. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  745. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  746. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  747. propertyValue             ds.l    1                ; offset: $16 (22)        ;  <-  The value of the property 
  748. sizeof                     EQU *                    ; size:   $1A (26)
  749.                         ENDR
  750. DETGetPropertyRStringBlock RECORD 0
  751. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  752. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  753. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  754. propertyValue             ds.l    1                ; offset: $16 (22)        ;  <-  A handle containing the property (as an RString) (caller must DisposHandle() when done) 
  755. sizeof                     EQU *                    ; size:   $1A (26)
  756.                         ENDR
  757. DETGetPropertyBinarySizeBlock RECORD 0
  758. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  759. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  760. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  761. propertyBinarySize         ds.l    1                ; offset: $16 (22)        ;  <-  The size of the property as a binary block 
  762. sizeof                     EQU *                    ; size:   $1A (26)
  763.                         ENDR
  764. DETGetPropertyBinaryBlock RECORD 0
  765. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  766. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  767. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  768. propertyValue             ds.l    1                ; offset: $16 (22)        ;  <-  Handle with the value of the property (caller must DisposHandle() when done) 
  769. sizeof                     EQU *                    ; size:   $1A (26)
  770.                         ENDR
  771. DETGetPropertyChangedBlock RECORD 0
  772. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  773. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  774. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  775. propertyChanged             ds.b    1                ; offset: $16 (22)        ;  <-  True if the property is marked as changed 
  776. filler1                     ds.b    1                ; offset: $17 (23)
  777. sizeof                     EQU *                    ; size:   $18 (24)
  778.                         ENDR
  779. DETGetPropertyEditableBlock RECORD 0
  780. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  781. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  782. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  783. propertyEditable         ds.b    1                ; offset: $16 (22)        ;  <-  True if the property can be edited by the user (if false, view will appear disabled) 
  784. filler1                     ds.b    1                ; offset: $17 (23)
  785. sizeof                     EQU *                    ; size:   $18 (24)
  786.                         ENDR
  787. DETSetPropertyTypeBlock    RECORD 0
  788. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  789. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  790. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  791. newType                     ds.w    1                ; offset: $16 (22)        ;   -> New type for property (just sets type, does not convert contents) 
  792. sizeof                     EQU *                    ; size:   $18 (24)
  793.                         ENDR
  794. DETSetPropertyNumberBlock RECORD 0
  795. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  796. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  797. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  798. newValue                 ds.l    1                ; offset: $16 (22)        ;   -> New value to set property to (and set type to number) 
  799. sizeof                     EQU *                    ; size:   $1A (26)
  800.                         ENDR
  801. DETSetPropertyRStringBlock RECORD 0
  802. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  803. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  804. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  805. newValue                 ds.l    1                ; offset: $16 (22)        ;   -> New value to set property to (and set type to RString) 
  806. sizeof                     EQU *                    ; size:   $1A (26)
  807.                         ENDR
  808. DETSetPropertyBinaryBlock RECORD 0
  809. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  810. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  811. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  812. newValue                 ds.l    1                ; offset: $16 (22)        ;   -> New value to set property to (and set type to binary) 
  813. newValueSize             ds.l    1                ; offset: $1A (26)        ;   -> Size of new value 
  814. sizeof                     EQU *                    ; size:   $1E (30)
  815.                         ENDR
  816. DETSetPropertyChangedBlock RECORD 0
  817. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  818. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  819. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  820. propertyChanged             ds.b    1                ; offset: $16 (22)        ;   -> Value to set changed flag on property to 
  821. filler1                     ds.b    1                ; offset: $17 (23)
  822. sizeof                     EQU *                    ; size:   $18 (24)
  823.                         ENDR
  824. DETSetPropertyEditableBlock RECORD 0
  825. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  826. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  827. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  828. propertyEditable         ds.b    1                ; offset: $16 (22)        ;   -> Value to set editable flag on property to 
  829. filler1                     ds.b    1                ; offset: $17 (23)
  830. sizeof                     EQU *                    ; size:   $18 (24)
  831.                         ENDR
  832. DETDirtyPropertyBlock    RECORD 0
  833. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  834. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  835. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  836. sizeof                     EQU *                    ; size:   $16 (22)
  837.                         ENDR
  838. DETDoPropertyCommandBlock RECORD 0
  839. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  840. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  841. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  842. parameter                 ds.l    1                ; offset: $16 (22)        ;  ->  Parameter of command 
  843. sizeof                     EQU *                    ; size:   $1A (26)
  844.                         ENDR
  845. DETSublistCountBlock    RECORD 0
  846. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  847. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  848. count                     ds.l    1                ; offset: $14 (20)        ;  <-  The number of items in the current item's sublist 
  849. sizeof                     EQU *                    ; size:   $18 (24)
  850.                         ENDR
  851. DETSelectedSublistCountBlock RECORD 0
  852. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  853. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  854. count                     ds.l    1                ; offset: $14 (20)        ;  <-  The number of selected items in the current item's sublist 
  855. sizeof                     EQU *                    ; size:   $18 (24)
  856.                         ENDR
  857. DETRequestSyncBlock        RECORD 0
  858. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  859. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  860. sizeof                     EQU *                    ; size:   $14 (20)
  861.                         ENDR
  862. DETAddMenuBlock            RECORD 0
  863. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  864. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  865. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  866. name                     ds.l    1                ; offset: $16 (22)        ;   -> Name of new menu item 
  867. parameter                 ds.l    1                ; offset: $1A (26)        ;   -> Parameter to return when this item is selected 
  868. addAfter                 ds.l    1                ; offset: $1E (30)        ;   -> Parameter of entry to add after, or -1 for add at end 
  869. sizeof                     EQU *                    ; size:   $22 (34)
  870.                         ENDR
  871. DETRemoveMenuBlock        RECORD 0
  872. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  873. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  874. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  875. itemToRemove             ds.l    1                ; offset: $16 (22)        ;   -> Parameter of menu item to remove 
  876. sizeof                     EQU *                    ; size:   $1A (26)
  877.                         ENDR
  878. DETMenuItemRStringBlock    RECORD 0
  879. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  880. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  881. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  882. itemParameter             ds.l    1                ; offset: $16 (22)        ;   -> Parameter of menu item to return string for 
  883. rString                     ds.l    1                ; offset: $1A (26)        ;  <-  Handle with the RString (caller must DisposHandle() when done) 
  884. sizeof                     EQU *                    ; size:   $1E (30)
  885.                         ENDR
  886. DETOpenDSSpecBlock        RECORD 0
  887. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  888. dsSpec                     ds.l    1                ; offset: $4 (4)        ;   -> DSSpec of object to be opened 
  889. sizeof                     EQU *                    ; size:   $8 (8)
  890.                         ENDR
  891. DETAboutToTalkBlock        RECORD 0
  892. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  893. sizeof                     EQU *                    ; size:   $4 (4)
  894.                         ENDR
  895. DETBreakAttributeBlock    RECORD 0
  896. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  897. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  898. breakAttribute             ds.l    1                ; offset: $14 (20)        ;   -> Attribute to parse 
  899. isChangeable             ds.b    1                ; offset: $18 (24)        ;   -> True if the value can be changed by the user 
  900. filler1                     ds.b    1                ; offset: $19 (25)
  901. sizeof                     EQU *                    ; size:   $1A (26)
  902.                         ENDR
  903. DETSavePropertyBlock    RECORD 0
  904. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  905. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  906. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  907. sizeof                     EQU *                    ; size:   $16 (22)
  908.                         ENDR
  909. DETGetCustomViewUserReferenceBlock RECORD 0
  910. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  911. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  912. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  913. userReference             ds.w    1                ; offset: $16 (22)        ;  <-  User reference value, as specified in the .r file 
  914. sizeof                     EQU *                    ; size:   $18 (24)
  915.                         ENDR
  916. DETGetCustomViewBoundsBlock RECORD 0
  917. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  918. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  919. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  920. bounds                     ds        Rect            ; offset: $16 (22)        ;  <-  Bounds of the view 
  921. sizeof                     EQU *                    ; size:   $1E (30)
  922.                         ENDR
  923. DETGetResourceBlock        RECORD 0
  924. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  925. target                     ds        DETTargetSpecification ; offset: $4 (4) ;  The target for the request 
  926. property                 ds.w    1                ; offset: $14 (20)        ;  The property to apply the request to 
  927. resourceType             ds.l    1                ; offset: $16 (22)        ;   -> Resource type 
  928. theResource                 ds.l    1                ; offset: $1A (26)        ;  <-  The resource handle (caller must dispose when done) 
  929. sizeof                     EQU *                    ; size:   $1E (30)
  930.                         ENDR
  931. DETTemplateCounts        RECORD 0
  932. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  933. aspectTemplateCount         ds.l    1                ; offset: $4 (4)        ;  <-  Number of aspect templates in the system 
  934. infoPageTemplateCount     ds.l    1                ; offset: $8 (8)        ;  <-  Number of info-page templates in the system 
  935. sizeof                     EQU *                    ; size:   $C (12)
  936.                         ENDR
  937. DETUnloadTemplatesBlock    RECORD 0
  938. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  939. sizeof                     EQU *                    ; size:   $4 (4)
  940.                         ENDR
  941.  
  942. DETCallBackBlock        RECORD 0
  943. protoCallBack             ds        DETProtoCallBackBlock ; offset: $0 (0)
  944.                          ORG 0
  945. beep                     ds        DETBeepBlock    ; offset: $0 (0)
  946.                          ORG 0
  947. busy                     ds        DETBusyBlock    ; offset: $0 (0)
  948.                          ORG 0
  949. changeCallFors             ds        DETChangeCallForsBlock ; offset: $0 (0)
  950.                          ORG 0
  951. getCommandSelectionCount  ds    DETGetCommandSelectionCountBlock ; offset: $0 (0)
  952.                          ORG 0
  953. getCommandItemN             ds        DETGetCommandItemNBlock ; offset: $0 (0)
  954.                          ORG 0
  955. getDSSpec                 ds        DETGetDSSpecBlock ; offset: $0 (0)
  956.                          ORG 0
  957. getTemplateFSSpec         ds        DETGetTemplateFSSpecBlock ; offset: $0 (0)
  958.                          ORG 0
  959. getOpenEdit                 ds        DETGetOpenEditBlock ; offset: $0 (0)
  960.                          ORG 0
  961. closeEdit                 ds        DETCloseEditBlock ; offset: $0 (0)
  962.                          ORG 0
  963. getPropertyType             ds        DETGetPropertyTypeBlock ; offset: $0 (0)
  964.                          ORG 0
  965. getPropertyNumber         ds        DETGetPropertyNumberBlock ; offset: $0 (0)
  966.                          ORG 0
  967. getPropertyRString         ds        DETGetPropertyRStringBlock ; offset: $0 (0)
  968.                          ORG 0
  969. getPropertyBinarySize     ds        DETGetPropertyBinarySizeBlock ; offset: $0 (0)
  970.                          ORG 0
  971. getPropertyBinary         ds        DETGetPropertyBinaryBlock ; offset: $0 (0)
  972.                          ORG 0
  973. getPropertyChanged         ds        DETGetPropertyChangedBlock ; offset: $0 (0)
  974.                          ORG 0
  975. getPropertyEditable         ds        DETGetPropertyEditableBlock ; offset: $0 (0)
  976.                          ORG 0
  977. setPropertyType             ds        DETSetPropertyTypeBlock ; offset: $0 (0)
  978.                          ORG 0
  979. setPropertyNumber         ds        DETSetPropertyNumberBlock ; offset: $0 (0)
  980.                          ORG 0
  981. setPropertyRString         ds        DETSetPropertyRStringBlock ; offset: $0 (0)
  982.                          ORG 0
  983. setPropertyBinary         ds        DETSetPropertyBinaryBlock ; offset: $0 (0)
  984.                          ORG 0
  985. setPropertyChanged         ds        DETSetPropertyChangedBlock ; offset: $0 (0)
  986.                          ORG 0
  987. setPropertyEditable         ds        DETSetPropertyEditableBlock ; offset: $0 (0)
  988.                          ORG 0
  989. dirtyProperty             ds        DETDirtyPropertyBlock ; offset: $0 (0)
  990.                          ORG 0
  991. doPropertyCommand         ds        DETDoPropertyCommandBlock ; offset: $0 (0)
  992.                          ORG 0
  993. sublistCount             ds        DETSublistCountBlock ; offset: $0 (0)
  994.                          ORG 0
  995. selectedSublistCount     ds        DETSelectedSublistCountBlock ; offset: $0 (0)
  996.                          ORG 0
  997. requestSync                 ds        DETRequestSyncBlock ; offset: $0 (0)
  998.                          ORG 0
  999. addMenu                     ds        DETAddMenuBlock ; offset: $0 (0)
  1000.                          ORG 0
  1001. removeMenu                 ds        DETRemoveMenuBlock ; offset: $0 (0)
  1002.                          ORG 0
  1003. menuItemRString             ds        DETMenuItemRStringBlock ; offset: $0 (0)
  1004.                          ORG 0
  1005. openDSSpec                 ds        DETOpenDSSpecBlock ; offset: $0 (0)
  1006.                          ORG 0
  1007. aboutToTalk                 ds        DETAboutToTalkBlock ; offset: $0 (0)
  1008.                          ORG 0
  1009. breakAttribute             ds        DETBreakAttributeBlock ; offset: $0 (0)
  1010.                          ORG 0
  1011. saveProperty             ds        DETSavePropertyBlock ; offset: $0 (0)
  1012.                          ORG 0
  1013. getCustomViewUserReference  ds    DETGetCustomViewUserReferenceBlock ; offset: $0 (0)
  1014.                          ORG 0
  1015. getCustomViewBounds         ds        DETGetCustomViewBoundsBlock ; offset: $0 (0)
  1016.                          ORG 0
  1017. getResource                 ds        DETGetResourceBlock ; offset: $0 (0)
  1018.                          ORG 0
  1019. templateCounts             ds        DETTemplateCounts ; offset: $0 (0)
  1020.                          ORG 0
  1021. unloadTemplates             ds        DETUnloadTemplatesBlock ; offset: $0 (0)
  1022.                          ORG 96
  1023. sizeof                     EQU *                    ; size:   $60 (96)
  1024.                         ENDR
  1025. ; typedef union DETCallBackBlock *        DETCallBackBlockPtr
  1026.  
  1027.  
  1028.  
  1029. ; typedef DETCallBlock *                DETCallBlockPtr
  1030.  
  1031. ; typedef DETCallBackUPP                 DETCallBack
  1032.  
  1033. DETProtoCallBlock        RECORD 0
  1034. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1035. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1036. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1037. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1038. ;     common to all invocations of code resource) 
  1039. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1040. ;     code resource) 
  1041. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1042. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1043. filler1                     ds.b    1                ; offset: $25 (37)
  1044. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1045. sizeof                     EQU *                    ; size:   $28 (40)
  1046.                         ENDR
  1047. DETInitBlock            RECORD 0
  1048. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1049. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1050. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1051. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) 
  1052. newCallFors                 ds.l    1                ; offset: $10 (16)        ;  <-  New call-for mask 
  1053. sizeof                     EQU *                    ; size:   $14 (20)
  1054.                         ENDR
  1055. DETExitBlock            RECORD 0
  1056. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1057. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1058. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1059. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) 
  1060. sizeof                     EQU *                    ; size:   $10 (16)
  1061.                         ENDR
  1062. DETInstanceInitBlock    RECORD 0
  1063. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1064. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1065. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1066. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1067. ;     common to all invocations of code resource) 
  1068. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1069. ;     code resource) 
  1070. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1071. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1072. filler1                     ds.b    1                ; offset: $25 (37)
  1073. sizeof                     EQU *                    ; size:   $26 (38)
  1074.                         ENDR
  1075. DETInstanceExitBlock    RECORD 0
  1076. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1077. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1078. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1079. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1080. ;     common to all invocations of code resource) 
  1081. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1082. ;     code resource) 
  1083. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1084. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1085. filler1                     ds.b    1                ; offset: $25 (37)
  1086. sizeof                     EQU *                    ; size:   $26 (38)
  1087.                         ENDR
  1088. DETInstanceIdleBlock    RECORD 0
  1089. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1090. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1091. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1092. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1093. ;     common to all invocations of code resource) 
  1094. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1095. ;     code resource) 
  1096. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1097. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1098. filler1                     ds.b    1                ; offset: $25 (37)
  1099. sizeof                     EQU *                    ; size:   $26 (38)
  1100.                         ENDR
  1101. DETPropertyCommandBlock    RECORD 0
  1102. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1103. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1104. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1105. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1106. ;     common to all invocations of code resource) 
  1107. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1108. ;     code resource) 
  1109. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1110. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1111. filler1                     ds.b    1                ; offset: $25 (37)
  1112. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1113. parameter                 ds.l    1                ; offset: $28 (40)        ;   -> Parameter of command 
  1114. sizeof                     EQU *                    ; size:   $2C (44)
  1115.                         ENDR
  1116. DETMaximumTextLengthBlock RECORD 0
  1117. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1118. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1119. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1120. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1121. ;     common to all invocations of code resource) 
  1122. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1123. ;     code resource) 
  1124. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1125. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1126. filler1                     ds.b    1                ; offset: $25 (37)
  1127. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1128. maxSize                     ds.l    1                ; offset: $28 (40)        ;  <-  Return the maximum number of characters the user can entry when property is edited in an EditText 
  1129. sizeof                     EQU *                    ; size:   $2C (44)
  1130.                         ENDR
  1131. DETViewListChangedBlock    RECORD 0
  1132. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1133. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1134. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1135. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1136. ;     common to all invocations of code resource) 
  1137. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1138. ;     code resource) 
  1139. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1140. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1141. filler1                     ds.b    1                ; offset: $25 (37)
  1142. sizeof                     EQU *                    ; size:   $26 (38)
  1143.                         ENDR
  1144. DETPropertyDirtiedBlock    RECORD 0
  1145. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1146. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1147. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1148. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1149. ;     common to all invocations of code resource) 
  1150. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1151. ;     code resource) 
  1152. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1153. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1154. filler1                     ds.b    1                ; offset: $25 (37)
  1155. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1156. sizeof                     EQU *                    ; size:   $28 (40)
  1157.                         ENDR
  1158. DETValidateSaveBlock    RECORD 0
  1159. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1160. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1161. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1162. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1163. ;     common to all invocations of code resource) 
  1164. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1165. ;     code resource) 
  1166. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1167. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1168. filler1                     ds.b    1                ; offset: $25 (37)
  1169. errorString                 ds.l    1                ; offset: $26 (38)        ;  <-  Handle with error string if validation fails (callee must allocate handle, DE will DisposHandle() it) 
  1170. sizeof                     EQU *                    ; size:   $2A (42)
  1171.                         ENDR
  1172. DETDropQueryBlock        RECORD 0
  1173. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1174. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1175. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1176. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1177. ;     common to all invocations of code resource) 
  1178. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1179. ;     code resource) 
  1180. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1181. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1182. filler1                     ds.b    1                ; offset: $25 (37)
  1183. modifiers                 ds.w    1                ; offset: $26 (38)        ;   -> Modifiers at drop time (option/control/command/shift keys) 
  1184. commandID                 ds.l    1                ; offset: $28 (40)        ;  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number) 
  1185. destinationType             ds        AttributeType    ; offset: $2C (44)        ;  <-> Type to convert attribute to 
  1186. copyToHFS                 ds.b    1                ; offset: $50 (80)        ;  <-  If true, object should be copied to HFS before being operated on, and deleted after 
  1187. filler2                     ds.b    1                ; offset: $51 (81)
  1188. sizeof                     EQU *                    ; size:   $52 (82)
  1189.                         ENDR
  1190. DETDropMeQueryBlock        RECORD 0
  1191. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1192. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1193. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1194. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1195. ;     common to all invocations of code resource) 
  1196. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1197. ;     code resource) 
  1198. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1199. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1200. filler1                     ds.b    1                ; offset: $25 (37)
  1201. modifiers                 ds.w    1                ; offset: $26 (38)        ;   -> Modifiers at drop time (option/control/command/shift keys) 
  1202. commandID                 ds.l    1                ; offset: $28 (40)        ;  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number) 
  1203. destinationType             ds        AttributeType    ; offset: $2C (44)        ;  <-> Type to convert attribute to 
  1204. copyToHFS                 ds.b    1                ; offset: $50 (80)        ;  <-  If true, object should be copied to HFS before being operated on, and deleted after 
  1205. filler2                     ds.b    1                ; offset: $51 (81)
  1206. sizeof                     EQU *                    ; size:   $52 (82)
  1207.                         ENDR
  1208. DETAttributeCreationBlock RECORD 0
  1209. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1210. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1211. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1212. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) 
  1213. parent                     ds.l    1                ; offset: $10 (16)        ;   -> The object within which the creation will occur 
  1214. refNum                     ds.w    1                ; offset: $14 (20)        ;   -> Refnum for returned address (DSSpecs in PDs only) 
  1215. identity                 ds.l    1                ; offset: $16 (22)        ;   -> The identity we're browsing as in the parent object 
  1216. attrType                 ds        AttributeType    ; offset: $1A (26)        ;  <-> The type of the attribute being created 
  1217. attrTag                     ds.l    1                ; offset: $3E (62)        ;  <-> The tag of the attribute being created 
  1218. value                     ds.l    1                ; offset: $42 (66)        ;  <-> The value to write (pre-allocated, resize as needed) 
  1219. sizeof                     EQU *                    ; size:   $46 (70)
  1220.                         ENDR
  1221. DETAttributeNewBlock    RECORD 0
  1222. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1223. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1224. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1225. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1226. ;     common to all invocations of code resource) 
  1227. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1228. ;     code resource) 
  1229. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1230. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1231. filler1                     ds.b    1                ; offset: $25 (37)
  1232. parent                     ds.l    1                ; offset: $26 (38)        ;   -> The object within which the creation will occur 
  1233. refNum                     ds.w    1                ; offset: $2A (42)        ;   -> Refnum for returned address (DSSpecs in PDs only) 
  1234. identity                 ds.l    1                ; offset: $2C (44)        ;   -> The identity we're browsing as in the parent object 
  1235. attrType                 ds        AttributeType    ; offset: $30 (48)        ;  <-> The type of the attribute being created 
  1236. attrTag                     ds.l    1                ; offset: $54 (84)        ;  <-> The tag of the attribute being created 
  1237. value                     ds.l    1                ; offset: $58 (88)        ;  <-> The value to write (pre-allocated, resize as needed) 
  1238. sizeof                     EQU *                    ; size:   $5C (92)
  1239.                         ENDR
  1240. DETAttributeChangeBlock    RECORD 0
  1241. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1242. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1243. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1244. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1245. ;     common to all invocations of code resource) 
  1246. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1247. ;     code resource) 
  1248. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1249. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1250. filler1                     ds.b    1                ; offset: $25 (37)
  1251. parent                     ds.l    1                ; offset: $26 (38)        ;   -> The object within which the creation will occur 
  1252. refNum                     ds.w    1                ; offset: $2A (42)        ;   -> Refnum for returned address (DSSpecs in PDs only) 
  1253. identity                 ds.l    1                ; offset: $2C (44)        ;   -> The identity we're browsing as in the parent object 
  1254. attrType                 ds        AttributeType    ; offset: $30 (48)        ;  <-> The type of the attribute being changed 
  1255. attrTag                     ds.l    1                ; offset: $54 (84)        ;  <-> The tag of the attribute being changed 
  1256. attrCID                     ds        AttributeCreationID ; offset: $58 (88) ;  <-> The CID of the attribute being changed 
  1257. value                     ds.l    1                ; offset: $60 (96)        ;  <-> The value to write (pre-allocated, resize as needed) 
  1258. sizeof                     EQU *                    ; size:   $64 (100)
  1259.                         ENDR
  1260. DETAttributeDeleteBlock    RECORD 0
  1261. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1262. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1263. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1264. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1265. ;     common to all invocations of code resource) 
  1266. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1267. ;     code resource) 
  1268. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1269. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1270. filler1                     ds.b    1                ; offset: $25 (37)
  1271. dsSpec                     ds.l    1                ; offset: $26 (38)        ;   -> The object which will be deleted 
  1272. refNum                     ds.w    1                ; offset: $2A (42)        ;   -> Refnum for returned address (DSSpecs in PDs only) 
  1273. identity                 ds.l    1                ; offset: $2C (44)        ;   -> The identity we're browsing as 
  1274. sizeof                     EQU *                    ; size:   $30 (48)
  1275.                         ENDR
  1276. DETItemNewBlock            RECORD 0
  1277. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1278. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1279. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1280. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1281. ;     common to all invocations of code resource) 
  1282. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1283. ;     code resource) 
  1284. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1285. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1286. filler1                     ds.b    1                ; offset: $25 (37)
  1287. sizeof                     EQU *                    ; size:   $26 (38)
  1288.                         ENDR
  1289. DETShouldSyncBlock        RECORD 0
  1290. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1291. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1292. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1293. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1294. ;     common to all invocations of code resource) 
  1295. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1296. ;     code resource) 
  1297. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1298. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1299. filler1                     ds.b    1                ; offset: $25 (37)
  1300. shouldSync                 ds.b    1                ; offset: $26 (38)        ;  <-  True if we should now sync with catalog 
  1301. filler2                     ds.b    1                ; offset: $27 (39)
  1302. sizeof                     EQU *                    ; size:   $28 (40)
  1303.                         ENDR
  1304. DETDoSyncBlock            RECORD 0
  1305. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1306. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1307. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1308. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1309. ;     common to all invocations of code resource) 
  1310. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1311. ;     code resource) 
  1312. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1313. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1314. filler1                     ds.b    1                ; offset: $25 (37)
  1315. sizeof                     EQU *                    ; size:   $26 (38)
  1316.                         ENDR
  1317. DETPatternInBlock        RECORD 0
  1318. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1319. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1320. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1321. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1322. ;     common to all invocations of code resource) 
  1323. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1324. ;     code resource) 
  1325. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1326. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1327. filler1                     ds.b    1                ; offset: $25 (37)
  1328. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1329. elementType                 ds.l    1                ; offset: $28 (40)        ;   -> Element type from pattern 
  1330. extra                     ds.l    1                ; offset: $2C (44)        ;   -> Extra field from pattern 
  1331. attribute                 ds.l    1                ; offset: $30 (48)        ;   -> The complete attribute 
  1332. dataOffset                 ds.l    1                ; offset: $34 (52)        ;  <-> Offset to current (next) byte 
  1333. bitOffset                 ds.w    1                ; offset: $38 (56)        ;  <-> Bit offset (next bit is *fData >> fBitOffset++) 
  1334. sizeof                     EQU *                    ; size:   $3A (58)
  1335.                         ENDR
  1336. DETPatternOutBlock        RECORD 0
  1337. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1338. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1339. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1340. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1341. ;     common to all invocations of code resource) 
  1342. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1343. ;     code resource) 
  1344. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1345. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1346. filler1                     ds.b    1                ; offset: $25 (37)
  1347. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1348. elementType                 ds.l    1                ; offset: $28 (40)        ;   -> Element type from pattern 
  1349. extra                     ds.l    1                ; offset: $2C (44)        ;   -> Extra field from pattern 
  1350. attribute                 ds.l    1                ; offset: $30 (48)        ;   -> The attribute (minus the data portion) 
  1351. data                     ds.l    1                ; offset: $34 (52)        ;   -> Data to be written (pre-allocated, resize and add at end) 
  1352. dataOffset                 ds.l    1                ; offset: $38 (56)        ;  <-> Offset to next byte to write 
  1353. bitOffset                 ds.w    1                ; offset: $3C (60)        ;  <-> Bit offset (if zero, handle will need to be resized to one more byte before write) 
  1354. sizeof                     EQU *                    ; size:   $3E (62)
  1355.                         ENDR
  1356. DETOpenSelfBlock        RECORD 0
  1357. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1358. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1359. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1360. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1361. ;     common to all invocations of code resource) 
  1362. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1363. ;     code resource) 
  1364. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1365. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1366. filler1                     ds.b    1                ; offset: $25 (37)
  1367. modifiers                 ds.w    1                ; offset: $26 (38)        ;   -> Modifiers at open time (option/control/command/shift keys) 
  1368. sizeof                     EQU *                    ; size:   $28 (40)
  1369.                         ENDR
  1370. DETConvertToNumberBlock    RECORD 0
  1371. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1372. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1373. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1374. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1375. ;     common to all invocations of code resource) 
  1376. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1377. ;     code resource) 
  1378. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1379. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1380. filler1                     ds.b    1                ; offset: $25 (37)
  1381. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1382. theValue                 ds.l    1                ; offset: $28 (40)        ;  <-  The converted value to return 
  1383. sizeof                     EQU *                    ; size:   $2C (44)
  1384.                         ENDR
  1385. DETConvertToRStringBlock RECORD 0
  1386. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1387. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1388. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1389. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1390. ;     common to all invocations of code resource) 
  1391. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1392. ;     code resource) 
  1393. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1394. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1395. filler1                     ds.b    1                ; offset: $25 (37)
  1396. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1397. theValue                 ds.l    1                ; offset: $28 (40)        ;  <-  A handle with the converted value (callee must allocate handle, DE will DisposHandle() it) 
  1398. sizeof                     EQU *                    ; size:   $2C (44)
  1399.                         ENDR
  1400. DETConvertFromNumberBlock RECORD 0
  1401. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1402. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1403. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1404. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1405. ;     common to all invocations of code resource) 
  1406. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1407. ;     code resource) 
  1408. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1409. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1410. filler1                     ds.b    1                ; offset: $25 (37)
  1411. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1412. theValue                 ds.l    1                ; offset: $28 (40)        ;   -> The value to convert (result should be written direct to the property) 
  1413. sizeof                     EQU *                    ; size:   $2C (44)
  1414.                         ENDR
  1415. DETConvertFromRStringBlock RECORD 0
  1416. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1417. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1418. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1419. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1420. ;     common to all invocations of code resource) 
  1421. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1422. ;     code resource) 
  1423. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1424. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1425. filler1                     ds.b    1                ; offset: $25 (37)
  1426. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1427. theValue                 ds.l    1                ; offset: $28 (40)        ;   -> The value to convert (result should be written direct to the property) 
  1428. sizeof                     EQU *                    ; size:   $2C (44)
  1429.                         ENDR
  1430. DETCustomViewDrawBlock    RECORD 0
  1431. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1432. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1433. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1434. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1435. ;     common to all invocations of code resource) 
  1436. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1437. ;     code resource) 
  1438. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1439. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1440. filler1                     ds.b    1                ; offset: $25 (37)
  1441. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1442. sizeof                     EQU *                    ; size:   $28 (40)
  1443.                         ENDR
  1444. DETCustomViewMouseDownBlock RECORD 0
  1445. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1446. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1447. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1448. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1449. ;     common to all invocations of code resource) 
  1450. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1451. ;     code resource) 
  1452. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1453. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1454. filler1                     ds.b    1                ; offset: $25 (37)
  1455. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1456. theEvent                 ds.l    1                ; offset: $28 (40)        ;   -> The original event record of the mouse-down 
  1457. sizeof                     EQU *                    ; size:   $2C (44)
  1458.                         ENDR
  1459. DETKeyPressBlock        RECORD 0
  1460. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1461. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1462. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1463. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1464. ;     common to all invocations of code resource) 
  1465. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1466. ;     code resource) 
  1467. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1468. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1469. filler1                     ds.b    1                ; offset: $25 (37)
  1470. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1471. theEvent                 ds.l    1                ; offset: $28 (40)        ;   -> The original event record of the key-press 
  1472. sizeof                     EQU *                    ; size:   $2C (44)
  1473.                         ENDR
  1474. DETPasteBlock            RECORD 0
  1475. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1476. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1477. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1478. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1479. ;     common to all invocations of code resource) 
  1480. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1481. ;     code resource) 
  1482. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1483. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1484. filler1                     ds.b    1                ; offset: $25 (37)
  1485. property                 ds.w    1                ; offset: $26 (38)        ;  The property number the call refers to 
  1486. modifiers                 ds.w    1                ; offset: $28 (40)        ;   -> Modifiers at paste time (option/control/command/shift keys) 
  1487. sizeof                     EQU *                    ; size:   $2A (42)
  1488.                         ENDR
  1489. DETCustomMenuSelectedBlock RECORD 0
  1490. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1491. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1492. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1493. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1494. ;     common to all invocations of code resource) 
  1495. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1496. ;     code resource) 
  1497. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1498. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1499. filler1                     ds.b    1                ; offset: $25 (37)
  1500. menuTableParameter         ds.w    1                ; offset: $26 (38)        ;   -> The "property" field from the custom menu table 
  1501. sizeof                     EQU *                    ; size:   $28 (40)
  1502.                         ENDR
  1503. DETCustomMenuEnabledBlock RECORD 0
  1504. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1505. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1506. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1507. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1508. ;     common to all invocations of code resource) 
  1509. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1510. ;     code resource) 
  1511. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1512. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1513. filler1                     ds.b    1                ; offset: $25 (37)
  1514. menuTableParameter         ds.w    1                ; offset: $26 (38)        ;   -> The "property" field from the custom menu table 
  1515. enable                     ds.b    1                ; offset: $28 (40)        ;  <-  Whether to enable the menu item 
  1516. filler2                     ds.b    1                ; offset: $29 (41)
  1517. sizeof                     EQU *                    ; size:   $2A (42)
  1518.                         ENDR
  1519. DETForwarderListItem    RECORD 0
  1520. next                     ds.l    1                ; offset: $0 (0)        ;  Pointer to next item, or nil 
  1521. attributeValueTag         ds.l    1                ; offset: $4 (4)        ;  Tag of new templates (0 for none) 
  1522. rstrs                     ds        PackedPathName ; offset: $8 (8)            ;  Record type (empty if none), attrbute type (empty if none),list of template names to forward to 
  1523. sizeof                     EQU *                    ; size:   $408 (1032)
  1524.                         ENDR
  1525. ; typedef struct DETForwarderListItem *    DETForwarderListPtr
  1526.  
  1527. ; typedef DETForwarderListPtr *            DETForwarderListHandle
  1528.  
  1529. DETDynamicForwardersBlock RECORD 0
  1530. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1531. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1532. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1533. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource) 
  1534. forwarders                 ds.l    1                ; offset: $10 (16)        ;  <-  List of forwaders 
  1535. sizeof                     EQU *                    ; size:   $14 (20)
  1536.                         ENDR
  1537. DETDynamicResourceBlock    RECORD 0
  1538. reqFunction                 ds.l    1                ; offset: $0 (0)        ;  Requested function 
  1539. callBack                 ds.l    1                ; offset: $4 (4)        ;  Pointer to call-back routine 
  1540. callBackPrivate             ds.l    1                ; offset: $8 (8)        ;  Private data for the call-back routine 
  1541. templatePrivate             ds.l    1                ; offset: $C (12)        ;  Private storage for use by code resource (stays for life of code resource, 
  1542. ;     common to all invocations of code resource) 
  1543. instancePrivate             ds.l    1                ; offset: $10 (16)        ;  Private storage for use by code resource (separate for each item using the 
  1544. ;     code resource) 
  1545. target                     ds        DETTargetSpecification ; offset: $14 (20) ;  The target (originator) of the call, for targeted and property calls 
  1546. targetIsMainAspect         ds.b    1                ; offset: $24 (36)        ;  True if the target is the main aspect (even though it has a non-nil name) 
  1547. filler1                     ds.b    1                ; offset: $25 (37)
  1548. resourceType             ds.l    1                ; offset: $26 (38)        ;   -> The resource type being requested 
  1549. propertyNumber             ds.w    1                ; offset: $2A (42)        ;   -> The property number of the resource being requested 
  1550. resourceID                 ds.w    1                ; offset: $2C (44)        ;   -> The resource ID (base ID + property number) of the resource 
  1551. theResource                 ds.l    1                ; offset: $2E (46)        ;  <-  The requested resource 
  1552. sizeof                     EQU *                    ; size:   $32 (50)
  1553.                         ENDR
  1554.  
  1555. DETCallBlock            RECORD 0
  1556. protoCall                 ds        DETProtoCallBlock ; offset: $0 (0)
  1557.                          ORG 0
  1558. init                     ds        DETInitBlock    ; offset: $0 (0)
  1559.                          ORG 0
  1560. exit                     ds        DETExitBlock    ; offset: $0 (0)
  1561.                          ORG 0
  1562. instanceInit             ds        DETInstanceInitBlock ; offset: $0 (0)
  1563.                          ORG 0
  1564. instanceExit             ds        DETInstanceExitBlock ; offset: $0 (0)
  1565.                          ORG 0
  1566. instanceIdle             ds        DETInstanceIdleBlock ; offset: $0 (0)
  1567.                          ORG 0
  1568. propertyCommand             ds        DETPropertyCommandBlock ; offset: $0 (0)
  1569.                          ORG 0
  1570. maximumTextLength         ds        DETMaximumTextLengthBlock ; offset: $0 (0)
  1571.                          ORG 0
  1572. viewListChanged             ds        DETViewListChangedBlock ; offset: $0 (0)
  1573.                          ORG 0
  1574. propertyDirtied             ds        DETPropertyDirtiedBlock ; offset: $0 (0)
  1575.                          ORG 0
  1576. validateSave             ds        DETValidateSaveBlock ; offset: $0 (0)
  1577.                          ORG 0
  1578. dropQuery                 ds        DETDropQueryBlock ; offset: $0 (0)
  1579.                          ORG 0
  1580. dropMeQuery                 ds        DETDropMeQueryBlock ; offset: $0 (0)
  1581.                          ORG 0
  1582. attributeCreationBlock     ds        DETAttributeCreationBlock ; offset: $0 (0)
  1583.                          ORG 0
  1584. attributeNew             ds        DETAttributeNewBlock ; offset: $0 (0)
  1585.                          ORG 0
  1586. attributeChange             ds        DETAttributeChangeBlock ; offset: $0 (0)
  1587.                          ORG 0
  1588. attributeDelete             ds        DETAttributeDeleteBlock ; offset: $0 (0)
  1589.                          ORG 0
  1590. itemNew                     ds        DETItemNewBlock ; offset: $0 (0)
  1591.                          ORG 0
  1592. patternIn                 ds        DETPatternInBlock ; offset: $0 (0)
  1593.                          ORG 0
  1594. patternOut                 ds        DETPatternOutBlock ; offset: $0 (0)
  1595.                          ORG 0
  1596. shouldSync                 ds        DETShouldSyncBlock ; offset: $0 (0)
  1597.                          ORG 0
  1598. doSync                     ds        DETDoSyncBlock ; offset: $0 (0)
  1599.                          ORG 0
  1600. openSelf                 ds        DETOpenSelfBlock ; offset: $0 (0)
  1601.                          ORG 0
  1602. convertToNumber             ds        DETConvertToNumberBlock ; offset: $0 (0)
  1603.                          ORG 0
  1604. convertToRString         ds        DETConvertToRStringBlock ; offset: $0 (0)
  1605.                          ORG 0
  1606. convertFromNumber         ds        DETConvertFromNumberBlock ; offset: $0 (0)
  1607.                          ORG 0
  1608. convertFromRString         ds        DETConvertFromRStringBlock ; offset: $0 (0)
  1609.                          ORG 0
  1610. customViewDraw             ds        DETCustomViewDrawBlock ; offset: $0 (0)
  1611.                          ORG 0
  1612. customViewMouseDown         ds        DETCustomViewMouseDownBlock ; offset: $0 (0)
  1613.                          ORG 0
  1614. keyPress                 ds        DETKeyPressBlock ; offset: $0 (0)
  1615.                          ORG 0
  1616. paste                     ds        DETPasteBlock    ; offset: $0 (0)
  1617.                          ORG 0
  1618. customMenuSelected         ds        DETCustomMenuSelectedBlock ; offset: $0 (0)
  1619.                          ORG 0
  1620. customMenuEnabled         ds        DETCustomMenuEnabledBlock ; offset: $0 (0)
  1621.                          ORG 0
  1622. dynamicForwarders         ds        DETDynamicForwardersBlock ; offset: $0 (0)
  1623.                          ORG 0
  1624. dynamicResource             ds        DETDynamicResourceBlock ; offset: $0 (0)
  1625.                          ORG 100
  1626. sizeof                     EQU *                    ; size:   $64 (100)
  1627.                         ENDR
  1628. ;  Call-for list: 
  1629.  
  1630. kDETCallForOther                EQU        1                    ; Call for things not listed below (also auto-enabled by DE if any of the below are enabled) 
  1631. kDETCallForIdle                    EQU        2                    ; kDETcmdIdle 
  1632. kDETCallForCommands                EQU        4                    ; kDETcmdPropertyCommand, kDETcmdSelfOpen 
  1633. kDETCallForViewChanges            EQU        8                    ; kDETcmdViewListChanged, kDETcmdPropertyDirtied, kDETcmdMaximumTextLength 
  1634. kDETCallForDrops                EQU        $10                    ; kDETcmdDropQuery, kDETcmdDropMeQuery 
  1635. kDETCallForAttributes            EQU        $20                    ; kDETcmdAttributeCreation, kDETcmdAttributeNew, kDETcmdAttributeChange, kDETcmdAttributeDelete 
  1636. kDETCallForValidation            EQU        $40                    ; kDETcmdValidateSave 
  1637. kDETCallForKeyPresses            EQU        $80                    ; kDETcmdKeyPress and kDETcmdPaste 
  1638. kDETCallForResources            EQU        $0100                ; kDETcmdDynamicResource 
  1639. kDETCallForSyncing                EQU        $0200                ; kDETcmdShouldSync, kDETcmdDoSync 
  1640. kDETCallForEscalation            EQU        $8000                ; All calls escalated from the next lower level 
  1641. kDETCallForNothing                EQU        0                    ; None of the above 
  1642. kDETCallForEverything            EQU        $FFFFFFFF            ; All of the above 
  1643. ; typedef DETCallUPP                     DETCall
  1644.  
  1645. ;  This following macro saves you from having to dig out the call-back pointer from the call block: 
  1646. ; ***********************************************************************************
  1647. ; ********************************* SAM Definitions: ********************************
  1648. ; ***********************************************************************************
  1649. ;  SAM Developers should use property numbers starting at this point: 
  1650.  
  1651. kSAMFirstDevProperty            EQU        50
  1652.  
  1653. ;    SAM templates have additional resources/properties that are required
  1654. ;    for interaction with the AOCE Key Chain.
  1655. ;    
  1656. ;     Type    Offset                        Description
  1657. ;     ----    ------                        -----------
  1658. ;    'rstr'    kSAMAspectUserName            The user name
  1659. ;    'rstr'    kSAMAspectKind                The kind of SAM
  1660. ;    'detn'    kSAMAspectCannotDelete        If 0, then the slot cannot be deleted
  1661. ;    'sami'    kSAMAspectSlotCreationInfo    The info required to create a slot record
  1662. ;
  1663.  
  1664.  
  1665. kSAMAspectUserName                EQU        41
  1666. kSAMAspectKind                    EQU        42
  1667. kSAMAspectCannotDelete            EQU        43
  1668. kSAMAspectSlotCreationInfo        EQU        44
  1669. ; **************************************************************************************
  1670. ; ********************************* Admin Definitions: *********************************
  1671. ; *************************************************************************************
  1672.  
  1673.  
  1674. kDETAdminVersion                EQU        -978
  1675.  
  1676.  
  1677.     ENDIF ; __OCETEMPLATES__ 
  1678.  
  1679.